﻿
#ifndef _ITEMSTRATEGY__
#define _ITEMSTRATEGY__

//道具策略类的父类
class ItemStrategy
{
public:
	virtual void UseItem(Fighter* mainobj) = 0;
	virtual ~ItemStrategy() {}
};

//补血丹策略类
class ItemStrategy_BXD :public ItemStrategy
{
public:
	virtual void UseItem(Fighter* mainobj)
	{
		mainobj->SetLife(mainobj->GetLife() + 200);  //补充200点生命值
	}
};

//大还丹策略类
class ItemStrategy_DHD :public ItemStrategy
{
public:
	virtual void UseItem(Fighter* mainobj)
	{
		mainobj->SetLife(mainobj->GetLife() + 300);  //补充300点生命值
	}
};


//守护丹策略类
class ItemStrategy_SHD :public ItemStrategy
{
public:
	virtual void UseItem(Fighter* mainobj)
	{
		mainobj->SetLife(mainobj->GetLife() + 500);  //补充500点生命值
	}
};

#endif